import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUi from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'font-awesome/css/font-awesome.min.css'
import * as echarts from 'echarts'

import commonJs from './assets/js/common'
import constantJs from './assets/js/constant'
import {commonData} from './mixins/mixin'
import store from './store'
// 设置生产警告提示关闭
Vue.config.productionTip = false
//引入Echarts
Vue.prototype.$echarts = echarts
//设置公共工具
Vue.prototype.$commonJs = commonJs
//设置常量
Vue.prototype.$constant = constantJs
//全局混入公共数据
Vue.mixin(commonData);
//引入ElementUi插件
Vue.use(ElementUi);

new Vue({
  el: '#app',
  //引入路由
  router,
  render: h => h(App),
  //引入VueX，状态管理
  store,
  beforeCreate(){
    //开启全局事件总线
    Vue.prototype.$bus = this
  }
})
